#include "LogManager.h"

namespace bamboo {

LogManager::LogManager() {
    getLogger("root");
}

Logger::ptr LogManager::getLogger(const std::string &name) {
    auto it = m_loggers.find(name);
    if (it != m_loggers.end()) {
        return it->second;
    }

    Logger::ptr logger(new Logger(name));
    m_loggers[name] = logger;
    return logger;
}
    
} // namespace bamboo
